import manager.SocketManager;
import routers.Routers;
import servlet.*;

import java.io.IOException;

public class Main {
    static {
        Routers.addRouter("/index",new IndexServlet());
        Routers.addRouter("/404",new NotFoundServlet());
        Routers.addRouter("/403",new NotSupportServlet());
        Routers.addRouter("/500",new SystemErrorServlet());
        Routers.addRouter("/download",new DownloadServlet());
        Routers.addRouter("/test",new TestServlet());
        Routers.addRouter("/login",new LoginServlet());
    }

    public static void main(String[] args) {
        try {
            SocketManager.loopForever();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
